﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace CrazySname.GameClasses
{
    public class CobraParte
    {
        public bool EhCabeca { get; private set; }
        public Texture2D Textura { get; private set; }
        public Point Posicao { get; set; }
        public int UltimaCurva { get; set; }

        public CobraParte()
        {
            UltimaCurva = 0;
        }

        public CobraParte(int x, int y)
            : this()
        {
            Posicao = new Point(x,y);
        }

        public CobraParte(Point ponto)
            : this()
        {
            Posicao = ponto;
        }

        public CobraParte(int x, int y, bool ehCabeca, Texture2D textura)
            : this()
        {
            Posicao = new Point(x, y);
            Textura = textura;
            EhCabeca = ehCabeca;
        }

        public void MoverParaBaixo()
        {
            Posicao = new Point(Posicao.X, Posicao.Y + 1);
        }

        public void MoverParaCima()
        {
            Posicao = new Point(Posicao.X, Posicao.Y - 1);
        }

        public void MoverParaEsquerda()
        {
            Posicao = new Point(Posicao.X - 1, Posicao.Y);
        }

        public void MoverParaDireita()
        {
            Posicao = new Point(Posicao.X + 1, Posicao.Y);
        }
    }
}